package com.sinochem.sales.common.entity;

import org.springframework.util.StringUtils;

import java.io.Serializable;

/**
 * @author xuan😴🐶🐱🐽🌺  <a href="zhangshixuanj@163.com">联系作者</a>
 * @version Revision:v1.0,Date: 2018/4/16 11:01
 * @project cloud
 * @description 错误消息
 * @Modification Date: 2018/4/16 11:01  {填写修改说明}
 */
public class Error implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 错误代码
     */
    private String code = "9999";
    /**
     * 错误信息
     */
    private String msg;

    public Error() {
    }

    public Error(String code, String msg) {
        if (StringUtils.isEmpty(code)) {
            this.code = code;
        }
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "Error{" +
                "code='" + code + '\'' +
                ", msg='" + msg + '\'' +
                '}';
    }
}
